package org.koyad.portal.tags.html;

import org.koyad.portal.annotations.TagCordinates;
import org.koyad.portal.constants.FrameworkConstants;
import org.koyad.portal.tags.AbstractTag;
import org.koyad.portal.tags.TagUtils;

@TagCordinates (
	uri = FrameworkConstants.HTML5_NAMESPACE,
	localName = "a"
)
public class AnchorTag extends AbstractTag {
	
	private static final String HREF_ATTRIBUTE_NAME = "href";
	
	@Override
	public void render() {
		Object value = TagUtils.getValue(getAttributeValue(HREF_ATTRIBUTE_NAME));
		getAttribute(HREF_ATTRIBUTE_NAME).setValue(value.toString());
		super.render();
	}
}
